From: Colin Walters Date: Tue, 21 Apr 2015 01:02:25 +0000 (-0400) Subject: status: Don't crash if we deployed a local refspec X-Git-Tag: archive/raspbian/2022.1-3+rpi1~1^2~784 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=6d84321a16ec581269bee947bb6f6fceacc2f0c4;p=ostree.git status: Don't crash if we deployed a local refspec In the case we built a local tree, we'd pass `NULL` as a remote down to the GPG checking code. Noticed this in the test suite. --- diff --git a/src/ostree/ot-admin-builtin-status.c b/src/ostree/ot-admin-builtin-status.c index c6597ab3..802aaa8e 100644 --- a/src/ostree/ot-admin-builtin-status.c +++ b/src/ostree/ot-admin-builtin-status.c @@ -74,7 +74,8 @@ deployment_get_gpg_verify (OstreeDeployment *deployment, if (!ostree_parse_refspec (refspec, &remote, NULL, NULL)) goto out; - (void) ostree_repo_remote_get_gpg_verify (repo, remote, &gpg_verify, NULL); + if (remote) + (void) ostree_repo_remote_get_gpg_verify (repo, remote, &gpg_verify, NULL); out: return gpg_verify;